package com.lvcoding.cloud.api.feign;

import com.lvcoding.cloud.api.entity.SysUser;
import com.lvcoding.cloud.api.feign.factory.UserFeignFallbackFactory;
import com.lvcoding.cloud.common.core.constant.CommonConstant;
import com.lvcoding.cloud.common.core.response.Res;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = CommonConstant.USER, fallbackFactory = UserFeignFallbackFactory.class)
public interface UserFeign {

    @GetMapping("user/info/{username}")
    Res<SysUser> userInfo(@PathVariable("username")String username);

    @GetMapping("user/nacos")
    String nacos();

    @GetMapping("user/nacos/order")
    String nacosOrder();
}
